package com.wtwd.campus.jdzc.dao;

import com.wtwd.campus.jdzc.entity.DeviceInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author mjy
 * @date 2022/02/15
 * @description
 */
@Mapper
public interface JdDeviceInfoMapper {

    //根据imei号查询设备
    DeviceInfo getDeviceInfoByImei(String imei);

    Integer updateDeviceInfo(@Param("deviceInfo") DeviceInfo deviceInfo);

    List<DeviceInfo> getDeviceInfoListByStuIdList(@Param("list") List<Integer> list);

    /**
     * 根据学生id查找设备
     * @param stuId
     * @return
     */
    DeviceInfo getDeviceInfoByStuId(Integer stuId);

    int unBindingStudentWithDevice(@Param("stuId") Integer stuId);

    int modifyPhoneByImei(@Param("imei") String imei,@Param("phone") String phone);

    List<Map<String,Object>> getStudentPlaceByStudentId(@Param("list") List<Integer> list);

    DeviceInfo getDeviceInfoByDeviceId(@Param("deviceId") Integer deviceId);
}
